Systems and Methods of Communication using a Message Header that Includes Header Flags

ABSTRACT

A method includes determining, at a first computing device, whether data to be communicated to a second computing device includes media data or protocol data. The method also includes, in response to determining that the data includes media data, generating a message header and a message body based on the media data. The message header includes a header flags portion and a header fields portion, and the header flags portion includes at least one flag having a value that indicates a length of a corresponding field of a plurality of fields of the header fields portion. The method further includes encapsulating the message header and the message body into a message and inserting the message into a media stream to be transmitted from the first computing device to the second computing device in accordance with a media communication protocol. The media stream is a bidirectional media stream.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of and claims priority to U.S.patent application Ser. No. 13/652,298, filed Oct. 15, 2012 and entitled“SYSTEMS AND METHODS OF COMMUNICATION USING A MESSAGE HEADER THATINCLUDES HEADER FLAGS”, the content of which is incorporated byreference in its entirety.

BACKGROUND

The popularity of the Internet, coupled with the increasing capabilitiesof personal/mobile electronic devices, has provided consumers with theability to enjoy multimedia content almost anytime and anywhere. Forexample, live (e.g., sports events) and video on demand (VOD) content(e.g., television shows and movies) can be streamed via the Internet topersonal electronic devices (e.g., computers, mobile phones, andInternet-enabled televisions).

Typically, a streaming protocol is used to stream content from a contentsource to a destination device. One example of a streaming protocol isreal time messaging protocol (RTMP). U.S. Pat. No. 7,272,658, U.S. Pat.No. 7,587,509, U.S. Pat. No. 8,065,426, U.S. Pat. No. 7,961,878, andU.S. Pat. No. 8,051,287 are associated with RTMP and/or RTMP encrypted(RTMPE). In RTMP, streams are communicated using fragments called“chunks.” Typically, a first chunk of a stream has a complete header,and subsequent chunks may have shorter headers that eliminate headerinformation that has not changed relative to the first chunk. Based onhow much redundant information is omitted, chunks may be classified asone of multiple types of chunks, and a chunk type may be included ineach chunk header. When a packet is divided into multiple chunks, eachchunk may have a chunk header. Further, a transmitting device may beresponsible for determining what type of chunk is being transmitted, sothat the chunk type field may be properly coded. Thus, existingstreaming protocols may occupy an unacceptably high amount of overheador involve an unacceptably large amount of control processing. The highoverhead or control processing may lead to degradation in stream quality(e.g., when a large number of packets are to be communicated, such asfor high-definition content, or when a large number of destinationdevices are simultaneously streaming the same content).

SUMMARY

A media communication protocol (e.g., a real-time media streamingprotocol) and systems and methods of communicating in accordance withthe protocol are disclosed. Media messages formatted in accordance withthe protocol may include a message header and a message body (e.g.,serialized binary data). The message header may include a message flagsportion and a message fields portion. The message flags portion mayinclude single-bit or multi-bit flags that indicate a length of acorresponding field in the message fields portion. For example, when astream identifier (ID) flag has a first value (e.g., 0), a correspondingstream ID field in the message fields portion of the message header mayhave a first length (e.g., 1 byte). However, when the stream ID flag hasa second value (e.g., 1), the stream ID field may have a second length(e.g., 4 bytes). The use of message flags may thus enable the use ofvariable length header fields, which may decrease an overall amount ofoverhead involved in transmitting the media messages. Media messages mayinclude separate channels for separate kinds of data (e.g., separateaudio, video, and text channels) and/or may include a channel thatinterleaves different kinds of data (e.g., a single channel that carriesinterleaved audio, video, and text).

The described media communication protocol may support protocolmessages. Protocol messages may be transmitted periodically tocommunicate status and/or accounting information (e.g., number ofpackets sent since last protocol message, number of bytes sent sincelast protocol message, etc.). The status/accounting information may beused to determine an overall “health” of the media stream and/orunderlying connection. Further, the described media communicationprotocol may be bidirectional. Thus, a single connection (e.g.,transmission control protocol (TCP)) connection may be used forbidirectional point-to-point communication between devices, such asbetween two servers and/or between a server and a user device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram to illustrate a particular embodiment of a systemthat supports communication using message headers that include headerflags;

FIG. 2 is a diagram to illustrate a particular embodiment of a systemthat supports communication between an origin server and edge serversusing message headers that include header flags;

FIG. 3 is a diagram to illustrate a particular embodiment of a systemthat supports communication between an origin server and a contentdelivery network using message headers that include header flags;

FIG. 4 is a diagram to illustrate a particular embodiment of an N-wayconference using a media server of any of FIGS. 1-3;

FIG. 5 is a diagram to illustrate a particular embodiment of abidirectional media stream of any of FIGS. 1-4;

FIG. 6 is a diagram to illustrate a particular embodiment of a messageheader that includes a header flags portion and a header fields portion;

FIG. 7 is a flowchart to illustrate a particular embodiment of a methodof generating a message that includes a message header having messageflags;

FIG. 8 is a flowchart to illustrate a particular embodiment of a methodof receiving a message that includes a message header having messageflags; and

FIG. 9 is a flowchart to illustrate a particular embodiment of a methodof setting values of message flags.

DETAILED DESCRIPTION

FIG. 1 is a diagram to illustrate a particular embodiment of a system100 that supports communication using message headers that includeheader flags. The system 100 includes a media server 102 that iscommunicably coupled to one or more publishing devices (e.g., anillustrative publishing device 120) and to one or more viewing devices(e.g., illustrative viewing devices 140, 160, and 180). The media server102 may receive one or more media streams from the publishing device 120and may provide one or more media streams to the viewing devices 140,160, and 180.

It should be noted that although various embodiments described hereinreference “viewing” devices, this is for illustration only. Thedescribed techniques may also be used with non-visual media streams(e.g., audio streams provided to “listening” or “playback” devices).Each media stream that is received by the media server 102 and eachmedia stream that is transmitted by the media server 102 may berepresented according to a media communication protocol. For example,the media communication protocol may support real-time streaming ofaudio, video, and/or non-audio/non-video (e.g., textual) data. Asfurther described herein, messages in the media streams may include amessage header, where the message header has a header flags portion anda header fields portion, and where a value of at least one header flagindicates a length of a corresponding header field. Moreover, as furtherdescribed herein, a media stream may include one or more channels,including one or more channels dedicated to a particular type of data(e.g., separate audio and video channels) or one or more channels thatinterleave different types of data (e.g., a single channel that includesinterleaved audio and video data).

The media server 102 may include one or more network interface(s) 104.For example, the network interface(s) 104 may include input interface(s)and output interface(s) that are configured to receive data and to senddata, respectively. In a particular embodiment, the network interface(s)104 may be wired and/or wireless interfaces that enable the media server102 to communicate data via a network, such as the Internet. Forexample, the network interface(s) 104 may include an Ethernet interface,a universal serial bus (USB) interface, a wireless interface compatiblewith an Institute of Electrical and Electronics Engineers (IEEE) 802.11protocol, etc.

The media server 102 may also include one or more processors 106 andvarious components that are executable by the processor(s) 106. As usedherein, the term “media server” may refer to software application(s)that perform media serving or processing, hardware systems (e.g.,servers) that support or perform media serving and processing, or anycombination thereof. Thus, various operations described with referenceto a media server may be implemented using hardware, software (e.g.,instructions executable by the processor(s) 106) or any combinationthereof.

In a particular embodiment, the media server 102 may include a packetgenerator/processor 108, a stream encoder 110, and a stream decoder 112that are executable by the processor(s) 106. For example, the packetgenerator/processor 108, the stream encoder 110, and the stream decoder112 may be implemented using one or more Java classes that areexecutable by a Java Virtual Machine (JVM) executing on the processor(s)106. The media server 102 may also include one or more storage devices114. The storage device(s) 114 may include volatile and/or non-volatilememory and may store or cache media stream content for subsequentretrieval.

The stream encoder 110 may be configured to encode or to transcode amedia stream. For example, the stream encoder 110 may generate mediadata (e.g., audio, video, and/or text data) to be sent to one or moreparticular destination devices. The stream encoder 110 may perform mediaprocessing functions such as format conversion, aspect ratio conversion,bitrate conversion, resolution conversion, color space conversion, etc.An output stream generated by the stream encoder 110 may be packetizedby the packet generator/processor 108 and transmitted via the networkinterface(s) 104, as further described herein.

The stream decoder 112 may be configured to decode a media stream. Forexample, the stream decoder 112 may process audio, video, and/or textstreams that may be provided by media sources in a variety of formats.The stream decoder 112 may perform functions such as format conversion,aspect ratio conversion, bitrate conversion, resolution conversion,color space conversion, etc. In a particular embodiment, the streamdecoder 112 may decode a media stream that is generated by packetgenerator/processor 108 after processing a media stream received via thenetwork interface(s) 104, as further described herein.

Examples of media formats supported by the stream encoder 110 and thestream decoder 112 include, but are not limited to, a hypertext transferprotocol (HTTP) live streaming (HLS) format that may be provided to iOS®devices (iOS is a registered trademark of Cisco Systems, Inc. of SanJose, Calif. and is used by Apple Inc. of Cupertino, Calif. underlicense), a HTTP dynamic streaming (HDS) format that may be provided toa device that is compatible with video for Adobe® Flash® (Adobe andFlash are registered trademarks of Adobe Systems Inc. of San Jose,Calif.), smooth streaming (e.g., an Internet Information Services (IIS)extension from Microsoft Corp. to implement adaptive bitrate streamingand provide media streams to devices running Microsoft® Silverlight® orother smooth streaming clients (Microsoft and Silverlight are registeredtrademarks of Microsoft Corp. of Redmond, Wash.)), and motion pictureexperts group (MPEG) dynamic adaptive streaming over HTTP (MPEG-DASH)(also known as international organization for standardization(ISO)/international electrotechnical commission (TEC) 23009-1).Additional audio formats, video formats, data formats and orcoder/decoders (CODECs) may also be supported.

A media stream received by or transmitted by the media server 102 may bea single-channel or multi-channel bidirectional media stream (BMS). Asused herein, a “bidirectional media stream” or “BMS” may have computingdevices (e.g., servers, media players, etc.) as endpoints and mayinclude one or more media messages and one or more protocol messages.Media messages may include a message body (e.g., raw serialized binarydata) and a message header. The message header may include a messageflags portion and a message fields portion. At least one flag in themessage flags portion may have a value that indicates a length of acorresponding field in the message fields portion. For example, when astream identifier (ID) flag has a first value (e.g., 0), a correspondingstream ID field in the message fields portion of the message header mayhave a first length (e.g., 1 byte). However, when the stream ID flag hasa second value (e.g., 1), the stream ID field may have a second length(e.g., 4 bytes). The use of message flags may thus enable the use ofvariable length header fields, which may decrease an overall amount ofoverhead involved in transmitting the media messages. Additionalillustrative examples of message flags and corresponding message fieldsare further described with reference to FIG. 6. It should be noted,however, that although bidirectional streams are described herein, amedia communication protocol that uses header flags and variable-lengthheader fields may also be used with unidirectional media streams.

Protocol messages may include a message body and a message header thatis generated based on protocol data. Protocol messages may be sentperiodically (e.g., based on a user-provided periodicity or a built inperiodicity) to provide accounting information for messages sent andreceived by each endpoint of the BMS. For example, protocol messages maybe sent every 250 messages or every 2.5 seconds. Protocol messages mayinclude data that can be used to determine a relative “health” of theBMS. For example a protocol message may include status/accountinginformation, such as a number of messages sent from one endpoint of theBMS to the other endpoint of the BMS, a number of bytes sent from oneendpoint of the BMS to the other endpoint of the BMS, etc. Thestatus/accounting information may be compared to an expected or minimumnumber of message/bytes to determine connection health. Such acomparison may be used to verify, for example, that the data a sendingdevice has sent up to that point in time has in fact been received by areceiving device.

For example, during setup of a connection (e.g., a transmission controlprotocol (TCP) connection) and BMS between two endpoints, a target orminimum message rate or data rate may be negotiated and agreed upon. Toillustrate, a minimum rate of 100 messages per second may be agreedupon. A protocol message rate (e.g., every 2.5 seconds) may also beagreed upon. During media streaming, protocol messages may be sent every2.5 seconds, where the protocol messages include a number of messagessent since the start of streaming or since the last protocol message. Ifa receiver notices that fewer than 250 messages (minimum of 100 messageper second×2.5 second window=250 messages) have been received, thereceiver may conclude that the health of the BMS has deteriorated andmay take remedial action.

As another example, the receiver may conclude that the health of the BMShas deteriorated in response to determining that the protocol messagewas delayed (as determined by examining a timecode in the protocolmessage). In some embodiments, media messages and protocol messages mayinclude either an absolute timecode or a relative timecode. An absolutetimecode may represent an amount of time that has elapsed since anagreed upon epoch (i.e., a “zero” time). A relative timecode mayrepresent an amount of time that has elapsed since a most recentoccurrence of an event that resets a clock or timer to zero (e.g., anamount of time since a last message of the same type that had the samechannel ID).

In a particular embodiment, the stream encoder 110, the stream decoder112, and/or media players (e.g., at the viewing devices 140, 160, and180) may be implemented to specifically support certain functions of thedescribed protocol. For example, a state machine may be maintained atthe media server 102 and the media players at the viewing devices 140,160, and 180 to calculate relative and/or absolute timecodes.

The packet generator/processor 108 may be executable by the processor(s)106 to perform various protocol level functions, such as generatingpackets to be transmitted via a BMS and processing packets received aBMS. For example, during transmission operations at the media server102, the packet generator/processor 108 may determine whether data to becommunicated to a destination computing device (e.g., one of the viewingdevices 140, 160, or 180 via a corresponding BMS 150, 170 or 190,respectively) includes (or is) media data or protocol data. In responseto determining that the data includes (or is) media data, the protocolgenerator/processor 108 may generate a message header and a message bodybased on the media data. The message header may include a header flagsportion and a header fields portion, where the header flags portionincludes at least one flag having a value that indicates a length of acorresponding field of a plurality of fields of the header fieldsportion. The protocol generator/processor 108 may also encapsulate themessage header and the message body into a media message that isinserted into a BMS to the destination computing device.

As another example, during reception operations at the media server 102,the protocol generator/processor 108 may receive a message (e.g., fromthe publishing device 120 via a BMS 130) communicated as part of a mediastream in accordance with a media communication protocol. The messagemay include a message header and a message body, and the message headermay include a header flags portion and a header fields portion. Theprotocol generator/processor 108 may determine a length of a particularfield of a plurality of fields in the header fields portion based on avalue of a corresponding flag of the header flags portion, and mayprocess the message based at least in part on the determined length ofthe particular field.

The system 100 of FIG. 1 may thus enable bidirectional communication ofmedia streams and data associated therewith. Advantageously, suchcommunication may utilize variable-length header fields and flags thatindicate lengths of the variable-length header fields. The header flagsmay therefore be used to achieve header compression, which may reduce anoverall amount of overhead involved with media stream communication.Using header flags and variable-length header fields may reduce networktraffic and increase data throughput as compared to existing mediacommunication protocols that have one or more fixed-length alternativesfor headers (e.g., a “full” header, and one or more shorter headers thatomit redundant data). Use of header flags and variable-length headerfields on a per-packet basis, as described with reference to FIG. 1, mayalso be preferable to existing media communication protocols that breakpackets into chunks and add a header to each chunk (e.g., because thesingle header for the packet may be smaller than a sum of the sizes ofeach of the chunk headers and/or because less control processing may beinvolved for the packet).

Furthermore, use of bidirectional streams in the system 100 of FIG. 1may simplify connection management and monitoring. For example, insteadof monitoring multiple connections/streams, a single BMS may bemonitored to determine aggregate upload and download metrics.

FIG. 2 is a diagram to illustrate a particular embodiment of a system200 that supports communication between an origin server and edgeservers using message headers that include header flags. The system 200of FIG. 2 may represent an origin-edge “pull” mechanism for videostreaming.

The system 200 includes an origin media server 202. The origin mediaserver 202 includes network interface(s) 204, processor(s) 206, a packetgenerator/processor 208, a stream encoder 210, a stream decoder 212, andstorage device(s) 214, each of which may function as described withreference to corresponding components of the media server 102 of FIG. 1.

The origin media server 202 may receive a BMS 230 from a publishingdevice 220, where the BMS 230 is associated with a “live” stream ofaudio, video, and/or text content (e.g., a video stream of a livesporting event). As described above with reference to FIG. 1, the BMS230 may utilize message headers that include message flags andvariable-length header fields.

The origin media server 202 may perform stream processing (e.g.,encoding or transcoding) and protocol-level functions with respect tothe received BMS 230 to generate output data to be provided to one ormore edge media servers 240. For example, the edge media servers 240 may“pull” media content from the origin media server 202 and may be usedfor redundancy and load balancing purposes when the live stream providedby the publishing device 220 is in high demand by viewing devices 270.In the embodiment of FIG. 2, the origin media server 202 provides a copyof the live stream from the publishing device 220 to a first edge mediaserver 242 via a first server-to-server BMS 252, to a second edge mediaserver 244 via a second sever-to-server BMS 254, and to a third edgemedia server 246 via a third server-to-server BMS 256. Each destinationviewing device 270 may receive the live stream via a corresponding BMS260 from one or more of the edge media servers 240. In an alternateembodiment, encoding/transcoding may be performed at the edge mediaservers 240 instead of at the origin media server 202.

The system 200 of FIG. 2 may thus support bidirectional communication ofmedia streams, including server-to-server communication. In addition, byusing a communication protocol that involves the use of header flags andvariable-length header fields, the system 200 of FIG. 2 may decreaseoverhead and increase throughput of such server-to-server communication.

FIG. 3 is a diagram to illustrate a particular embodiment of a system300 that supports communication between an origin server and a contentdelivery network (CDN) using message headers that include header flags.The system 300 of FIG. 3 may represent an origin-CDN “push” mechanismfor video streaming. In alternate embodiments, a CDN “pull” mechanismmay also be supported (e.g., a CDN may “pull” data from an origin mediaserver).

The system 300 includes an origin media server 302. The origin mediaserver 302 includes network interface(s) 304, processor(s) 306, a packetgenerator/processor 308, a stream encoder 310, a stream decoder 312, andstorage device(s) 314, each of which may function as described withreference to corresponding components of the media server 102 of FIG. 1.

The origin media server 302 may receive media content from one or morepublishing devices (e.g., via a “live” stream of such media content). Asdescribed above with reference to FIG. 2, the “live” stream may bereceived via a BMS 230 that utilizes message headers including messageflags and variable-length header fields.

The origin media server 302 may perform stream processing (e.g.,encoding or transcoding) and protocol-level functions with respect tothe received stream to generate output data to be provided (e.g.,“pushed”) to a CDN 330 via a server-to-CDN BMS 320. For example, variousservers (e.g., illustrative servers 332, 334, 336, 338 and 340) of theCDN 330 may be used for redundancy and load balancing (e.g., geographicload-balancing) purposes. In a particular embodiment, server-to-servercommunication with the CDN 330 may be implemented using BMSs asdescribed herein. Destination viewing devices 360 may receive the livestream via corresponding BMS 350 from the CDN 330 (e.g., from a server332-340 within the CDN 330).

The system 300 of FIG. 3 may thus support bidirectional communication ofmedia streams, including server-to-CDN communication. In addition, theuse of a communication protocol that involves the use of header flagsand variable-length header fields may decrease overhead and increasethroughput of such server-to-CDN communication.

It will be appreciated that FIGS. 1-3 are described with respect todevices that are either publishing devices or viewing devices. However,this is for illustration only. In particular embodiments, devices mayfunction as both publishers as well as viewers. For example, N-wayconferencing may occur between N users, where each of the N users has acomputing device that can capture/transmit a stream and receive/displayN−1 streams from the other N−1 users, where N is an integer greaterthan 1. FIG. 4 is a diagram to illustrate a particular embodiment ofsuch an N-way conference, and is generally designated 400. In theillustration of FIG. 4, N is equal to 2. That is, a media server 402implements a two-way conference between a first device 420 and a seconddevice 440. Although N equal to 2 is illustrated for ease ofexplanation, it should be noted that N may alternately be greater than2.

The media server 402 includes network interface(s) 404, processor(s)406, a packet generator/processor 408, a stream encoder 410, a streamdecoder 412, and storage device(s) 414, each of which may function asdescribed with reference to corresponding components of the media server102 of FIG. 1.

During operation, the first device 420 may capture media data (e.g., viaa camera and/or microphone at the first device 420) and transmit a firststream 432 to the media server 402. The first stream 432 may betransmitted using a first BMS 460. As described above with reference toFIG. 1, the first BMS 460 may support such real time media streaming andmay utilize message headers that include message flags andvariable-length header fields. Similarly, the second device 440 maycapture media data and transmit a second stream 454 to the media server402 using a second BMS 470. The media server 402 may perform real timestream processing operations on the first stream 432 and/or the secondstream 454 to generate a third stream 434 and/or a fourth stream 452.The third stream 434 may be provided to the first device 420 using thefirst BMS 460 and the fourth stream 452 may provided to the seconddevice 440 using the second BMS 470.

In a particular embodiment where the conference is an audio/videoconference, the BMSs 460, 470 used in FIG. 4 may each have two channels:an audio channel and a video channel. When non-audio and non-video datais communicated (e.g., one of the conference participants initiates atext messaging session or a whiteboard sharing session), an additionalchannel may be established for such non-audio/non-video data.Alternately, the BMSs 460, 470 may include a single channel thatinterleaves audio data, video data, and the additional data for the textmessaging/whiteboard sharing. The system 400 of FIG. 4 may thus enablereal-time N-way audio/video/data conferencing using bidirectional mediastreams.

FIG. 5 is a diagram to illustrate a particular embodiment of abidirectional media stream (BMS) 500. As described above, a BMS mayinclude one or more channels. For example, the BMS 500 may include anaudio data channel 502 that carries only audio data, a video datachannel 504 that carries only video data, and a non A/V channel 506 thatcarries one or more other kinds of data (e.g., text data and/or binarydata). Alternately, or in addition, the BMS 500 may include one or moreinterleaved channels 508 that interleave different kinds of data. Insome embodiments, each BMS may be associated with a particular streamID. To enable a receiver to distinguish between multiple channels of asingle stream, each media message may include a channel ID in additionto a stream ID, as further described with reference to FIG. 6.

It should be noted that other types of data may also be communicated viathe BMS 500. For example, a first device may use the BMS 500 to send aremote procedure call (RPC) to a second device to trigger an operation(e.g., procedure call) at the second device. For example, during a livevideo stream of a reality television show, a source device may send aremote procedure call to a viewing device to cause the viewing device todisplay an overlay that enables a viewer to vote for contestants on thereality television show.

FIG. 6 is a diagram to illustrate a particular embodiment 600 of a mediamessage that includes a message header 602 having a header flags portion610 and a header fields portion 612. For example, a media message mayinclude the message header 602 and a message body 604. The message body604 may include serialized binary data that represents audio, video,and/or data. In a particular embodiment, the media message may becommunicated via a BMS, as described with reference to FIGS. 1-5. Itshould be noted that the ordering of header flags and header fields inFIG. 6 is for illustration only and that one or more other orders may beimplemented.

The header flags portion 610 may include one or more header flags thatindicate lengths of corresponding fields in the header fields portion612. The header flags portion 610 may also include one or more flagsthat do not have a corresponding field in the header fields portion 612.Values of the header flags may be used by a receiver to parse themessage header 602.

For example, a first value (e.g., 0) of a single-bit channel ID flag mayindicate that a corresponding channel ID field in the header fieldsportion 612 has a first length (e.g., 1 byte). A second value (e.g., 1)of the channel ID flag may indicate that the channel ID field has asecond length (e.g., 3 bytes).

A first value (e.g., 0) of a single-bit size flag may indicate that acorresponding size field in the header fields portion 612 has a firstlength (e.g., 2 bytes). A second value (e.g., 1) of the size flag mayindicate that the size field has a second length (e.g., 3 bytes).

A first value (e.g., 00) of a two-bit timecode flag may indicate that acorresponding timecode field in the header fields portion 612 is arelative timecode and has a first length (e.g., 1 byte). A second value(e.g., 01) of the timecode flag may indicate that the timecode field isa relative timecode and has a second length (e.g., 3 bytes). A thirdvalue (e.g., 10) of the timecode flag may indicate that the timecodefield is an absolute timecode and has a third length (e.g., 4 bytes). Afourth value (e.g., 11) of the timecode flag may indicate that thetimecode field is an absolute timecode and has a fourth length (e.g., 8bytes).

A first value (e.g., 0) of a single-bit stream ID flag may indicate thata corresponding stream ID field in the header fields portion 612 has afirst length (e.g., 1 byte). A second value (e.g., 1) of the stream IDflag may indicate that the stream ID field has a second length (e.g., 4bytes).

A first value (e.g., 0) of a single-bit type flag may indicate that themessage that includes the message header 602 and the message body 604 isa media message (i.e., includes media data). A second value (e.g., 1) ofthe type flag may indicate that the message is a protocol message (i.e.,includes protocol data).

In a particular embodiment, the header flags portion 610 may implementan optional extension mechanism (e.g., so that one or more additionalheader flags may be accommodated). To illustrate, the header flagsportion 610 may include a “more flags” flag. When the “more flags” flaghas a first value (e.g., 0), the header flags portion 610 may notinclude any additional flags (i.e., the header flags portion 610 mayhave a first size). Conversely, when the “more flags” flag has a secondvalue (e.g., 1), the header flags portion 610 may occupy an extra byteor other unit of space (i.e., the header flags portion 610 may have asecond size) to accommodate additional flags. The “more flags” flaghaving the second value may also indicate that the header fields portion612 occupies extra space to accommodate additional fields correspondingto the additional flags.

FIG. 7 is a flowchart to illustrate a particular embodiment of a method700 of generating a message that includes a message header havingmessage flags. In an illustrative embodiment, the method 700 may beperformed by the systems of FIGS. 1-4.

The method 700 includes determining whether data to be communicated ismedia data or protocol data, at 702. For example, in FIG. 1, the packetgenerator/processor 108 may determine whether data to be communicated toone of the viewing devices 140, 160, or 180 is protocol data or mediadata.

When the data to be communicated is media data, the method 700 mayinclude generating a message header and a message body based on themedia data, at 704. The message header includes a header flags portionand a header fields portion, where the header flags portion includes atleast one flag having a value that indicates a length of a correspondingfield of a plurality of fields of the header fields portion. Forexample, in FIG. 1, the packet generator/processor 108 may generate amessage header and a message body. In an illustrative embodiment, themessage header and the message body may be formatted as described withreference to FIG. 6.

When the data to be communicated is protocol data, the method 700 mayinclude generating the message header and the message body based on theprotocol data, at 706. The protocol data may indicate number of messagestransmitted via a media stream (e.g., a BMS), an amount of datatransmitted via a media stream (e.g., a BMS), a timecode, one or moreother network health metrics, or any combination thereof. In aparticular embodiment, similar to a media message, a protocol messagemay also include one or more header flag having values that indicate asize of one or more corresponding header fields. For example, protocolmessages may also include a channel ID flag, a stream ID flag, atimecode flag, etc.

The method 700 may also include encapsulating the message header and themessage body into a message, at 708, and inserting the message into amedia stream to be transmitted to a computing device according to amedia communication protocol, at 710. For example, in FIG. 1, themessage may be transmitted to one of the viewing devices 140, 160, or180 via the corresponding BMS 150, 170, or 190.

FIG. 8 is a flowchart to illustrate a particular embodiment of a method800 of receiving a message that includes a message header having messageflags. In an illustrative embodiment, the method 800 may be performed bythe systems of FIGS. 1-4.

The method 800 includes receiving a message via a media stream that istransmitted in accordance with a media communication protocol, at 802.The message includes a message header and a message body, and themessage header includes a header flags portion and a header fieldsportion. For example, in FIG. 1, the media server 102 may receive amessage from the publishing device 120 via the BMS 130. In anillustrative embodiment, the message header and message body may beformatted as described with reference to FIG. 6.

The method 800 may also include determining a length of a particularfield of a plurality of fields in the header fields portion based on avalue of a corresponding flag of the header flags portion, at 804. Forexample, in FIG. 1, the packet generator/processor 108 may determine alength of a header field based on a value of a corresponding headerflag.

The method 800 may further include processing the message based at leastin part on the determined length of the particular field, at 806. Forexample, in FIG. 1, the packet generator/processor 108 may process(e.g., parse) the message based on the determined length. To illustrate,the packet generator/processor 108 may parse the message to identify atype flag that indicates whether the message is a media message or aprotocol message.

The method 800 may include determining (e.g., based on the type flag),whether the message is a media message or a protocol message, at 808.When it is determined that the message is a media message, the method800 may include processing media data (e.g., serialized binary datarepresenting audio and/or video content) in the message body, at 810.When it is determined that the message is a protocol message, the method800 may include processing protocol data (e.g., status/accountinginformation) in the message body. For example, the status/accountinginformation may indicate how many messages or bytes of data werecommunicated via the media stream during a particular interval of time.The status/accounting information may be compared with an expected orminimum number of messages or bytes of data to determine a relative“health” of the media stream (e.g., whether the stream is experiencingadverse network communication conditions). Media data and protocol datamay be processed by the same processor/processing module or by differentprocessors/processing modules.

FIG. 9 is a flowchart to illustrate a particular embodiment of a method900 of setting values of message flags (e.g., flags in the message flagsportion 610 of FIG. 6).

The method 900 includes identifying or receiving a new message to besent, at 902. When a new message is identified or received, all messageflags may be initialized to a default value (e.g., 0).

The method 900 also includes determining whether a channel ID associatedwith the message is greater than or equal to a first threshold (e.g.,256), at 904, and if so, setting a channel ID flag to 1, at 906. Themethod 900 further includes determining whether a size of the message isgreater than or equal to a second threshold (e.g., 65,536), at 908, andif so, setting a size flag to 1, at 910. The method 900 includesdetermining whether a stream ID associated with the message is greaterthan or equal to a third threshold (e.g., 256), at 912, and if so,setting a stream ID flag to 1, at 914

The method 900 also includes determining whether a message timecode isabsolute, at 916. If the message timecode is not absolute, i.e., isrelative, the method 900 includes determining if the relative timecodeis greater than or equal to a fourth threshold (e.g., 256), at 918. Ifthe relative timecode is not greater than or equal to the fourththreshold, the method 900 includes setting a timecode flag to 00, at920. If the relative timecode is greater than or equal to the fourththreshold, the method 900 includes setting the timecode flag to 01, at922.

If the message timecode is absolute, the method 900 includes determiningwhether the message timecode is greater than or equal to a fifththreshold (e.g., 2³²=4,294,967,296), at 924. If the absolute timecode isnot greater than or equal to the fifth threshold, the method 900includes setting the timecode flag to 10, at 926. If the absolutetimecode is greater than or equal to the fifth threshold, the method 900includes setting the timecode flag to 11, at 928.

Advancing to 930, the method 900 may include sending the message at 930.At 932, the method 900 may include determining whether a particularnumber of seconds (e.g., “x” seconds) have passed since a previousprotocol report, at 932. If so, the method 900 may include sending aprotocol report (e.g., a protocol message), at 936. If the particularnumber of seconds has not passed since the previous protocol report, themethod 900 includes determining whether a particular number of messages(e.g., “n” messages) has been sent since the previous protocol report,at 934. If so, a protocol report may be sent, at 936.

Advancing to 938, the method 900 may process a next message to be sent.For example, such processing of a next message may include returningfrom 938 back to 902.

It will be appreciated that, as illustrated in FIGS. 6 and 9, the headerfields may usually have the smaller of two or more potential sizes. Forexample, because most packets may be less than 65,536 bytes in length,most timecodes may be less than 255 milliseconds, etc., a smaller amountof space may used to represent the size field, the timecode field, etc.Thus, smaller field sizes may be designed to be the norm, which maydecrease overhead associated with real-time media streaming.

In accordance with various embodiments of the present disclosure, one ormore methods, functions, and modules described herein may be implementedby software programs executable by a computer system. Further, in anembodiment, implementations can include distributed processing,component/object distributed processing, and/or parallel processing. Inan embodiment, virtual computer system processing can be constructed toimplement one or more of the methods or functionality as describedherein.

Particular embodiments can be implemented using a computer systemexecuting a set of instructions that cause the computer system toperform any one or more of the methods or computer-based functionsdisclosed herein. A computer system may include a laptop computer, adesktop computer, a server computer, a mobile phone, a tablet computer,a set-top box, a media player, one or more other computing devices, orany combination thereof. The computer system may be connected, e.g.,using a network, to other computer systems or peripheral devices. Forexample, the computer system or components thereof can include or beincluded within any one or more of the publishing device 102 of FIG. 1,the media server 102 of FIG. 1, the viewing devices 140, 160, or 180 ofFIG. 1, the publishing device 220 of FIG. 2, the origin media server 202of FIG. 2, the edge media servers 240 of FIG. 2, the viewing devices 270of FIG. 2, the origin media server 302 of FIG. 3, the content deliverynetwork 330 of FIG. 3 (or servers thereof), the viewing devices 360 ofFIG. 3, the first device 420 of FIG. 4, the media server 402 of FIG. 4,the second device 440 of FIG. 4, or any combination thereof.

In a networked deployment, the computer system may operate in thecapacity of a server or as a client user computer in a server-clientuser network environment, or as a peer computer system in a peer-to-peer(or distributed) network environment. The term “system” can include anycollection of systems or sub-systems that individually or jointlyexecute a set, or multiple sets, of instructions to perform one or morecomputer functions.

In a particular embodiment, the instructions can be embodied in anon-transitory computer-readable or processor-readable medium. The terms“computer-readable medium” and “processor-readable medium” include asingle medium or multiple media, such as a centralized or distributeddatabase, and/or associated caches and servers that store one or moresets of instructions. The terms “computer-readable medium” and“processor-readable medium” also include any medium that is capable ofstoring a set of instructions for execution by a processor or that causea computer system to perform any one or more of the methods oroperations disclosed herein. For example, a computer-readable orprocessor-readable medium or storage device may include random accessmemory (RAM), flash memory, read-only memory (ROM), programmableread-only memory (PROM), erasable programmable read-only memory (EPROM),electrically erasable programmable read-only memory (EEPROM), registers,a hard disk, a removable disk, a disc-based memory (e.g., compact discread-only memory (CD-ROM)), or any other form of storage medium ordevice.

In conjunction with the described embodiments, a method includesdetermining, at a first computing device, whether data to becommunicated to a second computing device includes media data orprotocol data. The method also includes, in response to determining thatthe data includes media data, generating a message header and a messagebody based on the media data. The message header includes a header flagsportion and a header fields portion, and the header flags portionincludes at least one flag having a value that indicates a length of acorresponding field of a plurality of fields of the header fieldsportion. The method further includes encapsulating the message headerand the message body into a message and inserting the message into amedia stream to be transmitted from the first computing device to thesecond computing device in accordance with a media communicationprotocol. The media stream is a bidirectional media stream.

In another particular embodiment, an apparatus includes a processor anda media server executable by the processor to determine whether data tobe communicated to a computing device includes media data or protocoldata. The media server is also executable by the processor to, inresponse to determining that the data includes media data, generate amessage header and a message body based on the media data. The messageheader includes a header flags portion and a header fields portion,where the header flags portion includes at least one flag having a valuethat indicates a length of a corresponding field of a plurality offields of the header fields portion. The media server is furtherexecutable by the processor to encapsulate the message header and themessage body in a message and to insert the message into a media streamto be transmitted to the computing device. The media stream is abidirectional media stream.

In another particular embodiment, a computer-readable storage deviceincludes instructions that, when executed by a computer, cause thecomputer to receive a message communicated as part of a media stream inaccordance with a media communication protocol. The message includes amessage header and a message body, where the message header includes aheader flags portion and a header fields portion. The instructions, whenexecuted by the computer, also cause the computer to determine a lengthof a particular field of a plurality of fields in the header fieldsportion based on a value of a corresponding flag of the header flagsportion. The instructions, when executed by the computer, further causethe computer to process the message based at least in part on thedetermined length of the particular field. The media stream is abidirectional media stream.

The illustrations of the embodiments described herein are intended toprovide a general understanding of the structure of the variousembodiments. The illustrations are not intended to serve as a completedescription of all of the elements and features of apparatus and systemsthat utilize the structures or methods described herein. Many otherembodiments may be apparent to those of skill in the art upon reviewingthe disclosure. Other embodiments may be utilized and derived from thedisclosure, such that structural and logical substitutions and changesmay be made without departing from the scope of the disclosure.Accordingly, the disclosure and the figures are to be regarded asillustrative rather than restrictive.

Although specific embodiments have been illustrated and describedherein, it should be appreciated that any subsequent arrangementdesigned to achieve the same or similar purpose may be substituted forthe specific embodiments shown. This disclosure is intended to cover anyand all subsequent adaptations or variations of various embodiments.Combinations of the above embodiments, and other embodiments notspecifically described herein, will be apparent to those of skill in theart upon reviewing the description.

The Abstract of the Disclosure is submitted with the understanding thatit will not be used to interpret or limit the scope or meaning of theclaims. In addition, in the foregoing Detailed Description, variousfeatures may be grouped together or described in a single embodiment forthe purpose of streamlining the disclosure. This disclosure is not to beinterpreted as reflecting an intention that the claimed embodimentsrequire more features than are expressly recited in each claim. Rather,as the following claims reflect, inventive subject matter may bedirected to less than all of the features of any of the disclosedembodiments.

The above-disclosed subject matter is to be considered illustrative, andnot restrictive, and the appended claims are intended to cover all suchmodifications, enhancements, and other embodiments, which fall withinthe true scope of the present disclosure. Thus, to the maximum extentallowed by law, the scope of the present disclosure is to be determinedby the broadest permissible interpretation of the following claims andtheir equivalents, and shall not be restricted or limited by theforegoing detailed description.

1. A method comprising: determining, at a first computing device,whether data to be communicated to a second computing device comprisesmedia data or protocol data; in response to determining that the datacomprises media data, generating a message header and a message bodybased on the media data, wherein the message header comprises a headerflags portion and a header fields portion, wherein the header flagsportion includes a plurality of flags, wherein each flag of theplurality of flags corresponds to a field of a plurality of fields ofthe header fields portion, and wherein each flag has a value selectedfrom a plurality of available values, the selected value indicating thatthe corresponding field has a length selected from a plurality ofavailable lengths; encapsulating the message header and the message bodyinto a message; and inserting the message into a media stream to betransmitted from the first computing device to the second computingdevice in accordance with a media communication protocol, wherein themedia stream is a bidirectional media stream.
 2. The method of claim 1,wherein at least one channel of the media stream includes audio data. 3.The method of claim 1, wherein at least one channel of the media streamincludes video data.
 4. The method of claim 1, wherein at least onechannel of the media stream includes data other than audio data andvideo data.
 5. The method of claim 1, wherein at least one channel ofthe media stream comprises interleaved audio and video data.
 6. Themethod of claim 1, wherein: the plurality of flags includes a channelidentifier (ID) flag, a first value of the channel ID flag indicatesthat a corresponding channel ID field in the header fields portion ofthe message header has a first length, and a second value of the channelID flag indicates that the corresponding channel ID field has a secondlength.
 7. The method of claim 1, wherein: the plurality of flagsincludes a size flag, a first value of the size flag indicates that acorresponding size field in the header fields portion of the messageheader has a first length, and a second value of the size flag indicatesthat the corresponding size field has a second length.
 8. The method ofclaim 1, wherein: the plurality of flags includes a timecode flag, afirst value of the timecode flag indicates that a corresponding timecodefield in the header fields portion of the message header includes arelative timecode having a first length, a second value of the timecodeflag indicates that the corresponding timecode field includes a relativetimecode having a second length, a third value of the timecode flagindicates that the corresponding timecode field includes an absolutetimecode having a third length, and a fourth value of the timecode flagindicates that the corresponding timecode field includes an absolutetimecode having a fourth length.
 9. The method of claim 1, wherein: theplurality of flags includes a stream identifier (ID) flag, a first valueof the stream ID flag indicates that a corresponding stream ID field inthe header fields portion of the message header has a first length, anda second value of the stream ID flag indicates that the correspondingstream ID field has a second length.
 10. The method of claim 1, wherein:the header flags portion of the message header includes a message typeflag, a first value of the message type flag indicates that the messageincludes media data, and a second value of the message type flagindicates that the message includes protocol data.
 11. The method ofclaim 1, wherein the header flags portion of the message header includesdata to indicate whether the plurality of flags has a first number offlags or more than the first number of flags.
 12. The method of claim 1,wherein the first computing device comprises a first media server. 13.The method of claim 12, wherein the second computing device comprises asecond media server.
 14. The method of claim 1, wherein one of the firstcomputing device and the second computing device comprises a mediaserver and wherein the other of the first computing device and thesecond computing device comprises a device configured to publish mediacontent to the media server, a device configured to play media contentreceived from the media server, or any combination thereof.
 15. Themethod of claim 1, wherein at least one of the first computing deviceand the second computing device is associated with a content deliverynetwork (CDN).
 16. The method of claim 1, further comprising: inresponse to determining that the data comprises protocol data,generating the message header and the message body based on the protocoldata, wherein the protocol data indicates a number of messagestransmitted from the first computing device to the second computingdevice via the media stream, an amount of data transmitted from thefirst computing device to the second computing device via the mediastream, a timecode of the message, or any combination thereof.
 17. Anapparatus comprising: a processor; and a media server executable by theprocessor to: determine whether data to be communicated to a computingdevice comprises media data or protocol data; in response to determiningthat the data comprises media data, generate a message header and amessage body based on the media data, wherein the message headercomprises a header flags portion and a header fields portion, whereinthe header flags portion includes a plurality of flags, wherein eachflag of the plurality of flags corresponds to a field of a plurality offields of the header fields portion, and wherein each flag has a valueselected from a plurality of available values the selected valueindicating that the corresponding field has a length selected from aplurality of available lengths; encapsulate the message header and themessage body in a message; and insert the message into a media stream tobe transmitted to the computing device, wherein the media stream is abidirectional media stream.
 18. The apparatus of claim 17, wherein themedia server is further executable by the processor to encode a receivedmedia stream to generate the media data.
 19. The apparatus of claim 17,wherein the media server is further executable by the processor toimplement an N-way conference between N computing devices, wherein eachof the N computing devices transmits a corresponding media stream to themedia server and receives N−1 media streams from the media server,wherein N is an integer greater than one.
 20. A computer-readablestorage device comprising instructions that, when executed by acomputer, cause the computer to: receive a message communicated as partof a media stream in accordance with a media communication protocol,wherein the media stream is a bidirectional media stream, wherein themessage includes a message header and a message body, wherein themessage header comprises a header flags portion and a header fieldsportion, wherein the header flags portion includes a plurality of flags,wherein each flag of the plurality of flags corresponds to a field of aplurality of fields of the header fields portion, and wherein each flaghas a value selected from a plurality of available values, the selectedvalue indicating that the corresponding field has a length selected froma plurality of available lengths; determine a length of a particularfield of a plurality of fields in the header fields portion based on avalue of a corresponding flag of the header flags portion; and processthe message based at least in part on the determined length of theparticular field.